{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}C:\Users\scottclifford\Dropbox\Research\Group Attitudes\Replication\s1log.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}29 May 2024, 15:59:17

{com}. do "C:\Users\SCOTTC~1\AppData\Local\Temp\1\STD5354_000000.tmp"
{txt}
{com}. 
. use "s1data.dta"
{txt}
{com}. 
. *PID
. gen PID=pid
{txt}
{com}. recode PID 1=2 2=6 3/4=4
{txt}(1,056 changes made to {bf:PID})

{com}. recode PID 2=1 if pidd==1
{txt}(284 changes made to {bf:PID})

{com}. recode PID 6=7 if pidr==1
{txt}(195 changes made to {bf:PID})

{com}. recode PID 4=3 if pidi==1
{txt}(92 changes made to {bf:PID})

{com}. recode PID 4=5 if pidi==2
{txt}(88 changes made to {bf:PID})

{com}. replace PID=(PID-4)/3
{txt}(1,105 real changes made)

{com}. recode PID -1/-.5=1 -.4/.4=2 .5/1=3, gen(PID3)
{txt}(1,105 differences between {bf:PID} and {bf:PID3})

{com}. recode ideo 1/3=1 4=2 5/7=3, gen(ideo3)
{txt}(963 differences between {bf:ideo} and {bf:ideo3})

{com}. 
. 
. *pretreatment group attitudes
. rename groups_1 favasian
{res}{txt}
{com}. replace favasian=favasian/100
{txt}variable {bf}{res}favasian{sf}{txt} was {bf}{res}byte{sf}{txt} now {bf}{res}float{sf}
{txt}(1,085 real changes made)

{com}. 
. *policy attitude
. rename policy_1 gunrestrict
{res}{txt}
{com}. replace gunrestrict=(gunrestrict-3)/2
{txt}variable {bf}{res}gunrestrict{sf}{txt} was {bf}{res}byte{sf}{txt} now {bf}{res}float{sf}
{txt}(1,105 real changes made)

{com}. 
. *treatment indicator
. gen treat_viet=.
{txt}(1,105 missing values generated)

{com}. replace treat_viet=0 if YI==1
{txt}(553 real changes made)

{com}. replace treat_viet=1 if YF==1
{txt}(532 real changes made)

{com}. 
. *outcome variables
. recode viet_favor 1=7 4=6 5=5 6=4 7=3 8=2 9=1
{txt}(937 changes made to {bf:viet_favor})

{com}. gen viet_favor01=(viet_favor-1)/6
{txt}(22 missing values generated)

{com}. gen viet_values01=(viet_values-1)/4
{txt}(23 missing values generated)

{com}. gen viet_close01=(viet_close-1)/3
{txt}(23 missing values generated)

{com}. sum viet_*01

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
viet_favor01 {c |}{res}      1,083    .6960603    .2273479          0          1
{txt}viet_valu~01 {c |}{res}      1,082    .4854436    .2486471          0          1
{txt}viet_close01 {c |}{res}      1,082    .5073937    .2708976          0          1
{txt}
{com}. 
. *outcome index
. alpha viet_values01 viet_close01 viet_favor01, item casewise gen(viet_index)

{txt}Test scale = mean(unstandardized items)

                                                            Average
                             Item-test     Item-rest       interitem
Item         {c |}  Obs  Sign   correlation   correlation     covariance      alpha
{hline 13}{c +}{hline 65}
viet_valu~01{col 14}{c |}{res}{col 16}1081{col 24}+{col 31} 0.8149{col 45} 0.5682{col 59} .0263666{col 73} 0.5936
{txt}viet_close01{col 14}{c |}{res}{col 16}1081{col 24}+{col 31} 0.8540{col 45} 0.6114{col 59} .0207317{col 73} 0.5357
{txt}viet_favor01{col 14}{c |}{res}{col 16}1081{col 24}+{col 31} 0.7260{col 45} 0.4496{col 59} .0387232{col 73} 0.7296
{txt}{hline 13}{c +}{hline 65}
Test scale{col 14}{c |}{res}{col 59} .0286071{col 73} 0.7188
{txt}{hline 13}{c BT}{hline 65}

{com}. 
. 
. ************
. * analysis *
. ************
. 
. *manipulation checks - Table A1
. reg viet_gun treat_viet

{txt}      Source {c |}       SS           df       MS      Number of obs   ={res}     1,078
{txt}{hline 13}{c +}{hline 34}   F(1, 1076)      = {res}   104.31
{txt}       Model {c |} {res} 59748.4061         1  59748.4061   {txt}Prob > F        ={res}    0.0000
{txt}    Residual {c |} {res}  616333.58     1,076  572.800725   {txt}R-squared       ={res}    0.0884
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.0875
{txt}       Total {c |} {res} 676081.986     1,077  627.745577   {txt}Root MSE        =   {res} 23.933

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}  viet_gun_1{col 14}{c |} Coefficient{col 26}  Std. err.{col 38}      t{col 46}   P>|t|{col 54}     [95% con{col 67}f. interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}treat_viet {c |}{col 14}{res}{space 2} 14.89273{col 26}{space 2} 1.458186{col 37}{space 1}   10.21{col 46}{space 3}0.000{col 54}{space 4} 12.03152{col 67}{space 3} 17.75394
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} 48.28909{col 26}{space 2} 1.020517{col 37}{space 1}   47.32{col 46}{space 3}0.000{col 54}{space 4} 46.28666{col 67}{space 3} 50.29152
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}. reg viet_pid treat_viet

{txt}      Source {c |}       SS           df       MS      Number of obs   ={res}     1,077
{txt}{hline 13}{c +}{hline 34}   F(1, 1075)      = {res}     9.38
{txt}       Model {c |} {res} 3370.01804         1  3370.01804   {txt}Prob > F        ={res}    0.0023
{txt}    Residual {c |} {res}  386404.48     1,075  359.446028   {txt}R-squared       ={res}    0.0086
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.0077
{txt}       Total {c |} {res} 389774.498     1,076  362.243957   {txt}Root MSE        =   {res} 18.959

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}  viet_pid_1{col 14}{c |} Coefficient{col 26}  Std. err.{col 38}      t{col 46}   P>|t|{col 54}     [95% con{col 67}f. interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}treat_viet {c |}{col 14}{res}{space 2} 3.538648{col 26}{space 2} 1.155681{col 37}{space 1}    3.06{col 46}{space 3}0.002{col 54}{space 4} 1.271001{col 67}{space 3} 5.806294
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} 53.90727{col 26}{space 2} .8084171{col 37}{space 1}   66.68{col 46}{space 3}0.000{col 54}{space 4} 52.32102{col 67}{space 3} 55.49353
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}. 
. *main analysis - Table A2
. reg viet_index i.treat_viet##c.gunrestrict PID favasian

{txt}      Source {c |}       SS           df       MS      Number of obs   ={res}     1,081
{txt}{hline 13}{c +}{hline 34}   F(5, 1075)      = {res}    31.17
{txt}       Model {c |} {res} 5.44331899         5   1.0886638   {txt}Prob > F        ={res}    0.0000
{txt}    Residual {c |} {res} 37.5412922     1,075  .034922132   {txt}R-squared       ={res}    0.1266
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.1226
{txt}       Total {c |} {res} 42.9846112     1,080  .039800566   {txt}Root MSE        =   {res} .18687

{txt}{hline 25}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}              viet_index{col 26}{c |} Coefficient{col 38}  Std. err.{col 50}      t{col 58}   P>|t|{col 66}     [95% con{col 79}f. interval]
{hline 25}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 12}1.treat_viet {c |}{col 26}{res}{space 2}-.0068005{col 38}{space 2} .0120642{col 49}{space 1}   -0.56{col 58}{space 3}0.573{col 66}{space 4}-.0304725{col 79}{space 3} .0168715
{txt}{space 13}gunrestrict {c |}{col 26}{res}{space 2} .0160525{col 38}{space 2} .0114613{col 49}{space 1}    1.40{col 58}{space 3}0.162{col 66}{space 4}-.0064365{col 79}{space 3} .0385415
{txt}{space 24} {c |}
treat_viet#c.gunrestrict {c |}
{space 22}1  {c |}{col 26}{res}{space 2}-.0765056{col 38}{space 2} .0157752{col 49}{space 1}   -4.85{col 58}{space 3}0.000{col 66}{space 4}-.1074592{col 79}{space 3} -.045552
{txt}{space 24} {c |}
{space 21}PID {c |}{col 26}{res}{space 2} .0452616{col 38}{space 2}  .008579{col 49}{space 1}    5.28{col 58}{space 3}0.000{col 66}{space 4} .0284282{col 79}{space 3}  .062095
{txt}{space 16}favasian {c |}{col 26}{res}{space 2} .2335733{col 38}{space 2} .0227738{col 49}{space 1}   10.26{col 58}{space 3}0.000{col 66}{space 4} .1888871{col 79}{space 3} .2782596
{txt}{space 19}_cons {c |}{col 26}{res}{space 2} .3938791{col 38}{space 2} .0185239{col 49}{space 1}   21.26{col 58}{space 3}0.000{col 66}{space 4}  .357532{col 79}{space 3} .4302261
{txt}{hline 25}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}. est store v1
{txt}
{com}. margins, dydx(treat_viet) at(gunrestrict=(-1(.5)1))
{res}
{txt}{col 1}Average marginal effects{col 58}{lalign 13:Number of obs}{col 71} = {res}{ralign 5:1,081}
{txt}{col 1}Model VCE: {res:OLS}

{txt}{p2colset 1 13 13 2}{...}
{p2col:Expression:}{res:Linear prediction, predict()}{p_end}
{p2col:dy/dx wrt:}{res:1.treat_viet}{p_end}
{p2colreset}{...}
{lalign 7:1._at: }{space 0}{lalign 11:gunrestrict} = {res:{ralign 3:-1}}
{lalign 7:2._at: }{space 0}{lalign 11:gunrestrict} = {res:{ralign 3:-.5}}
{lalign 7:3._at: }{space 0}{lalign 11:gunrestrict} = {res:{ralign 3:0}}
{lalign 7:4._at: }{space 0}{lalign 11:gunrestrict} = {res:{ralign 3:.5}}
{lalign 7:5._at: }{space 0}{lalign 11:gunrestrict} = {res:{ralign 3:1}}

{res}{txt}{hline 14}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 15}{c |}{col 27} Delta-method
{col 15}{c |}      dy/dx{col 27}   std. err.{col 39}      t{col 47}   P>|t|{col 55}     [95% con{col 68}f. interval]
{hline 14}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}{res}0.treat_viet {col 15}{txt}{c |}  (base outcome)
{hline 14}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}1.treat_viet  {txt}{c |}
{space 10}_at {c |}
{space 11}1  {c |}{col 15}{res}{space 2} .0697051{col 27}{space 2}  .016352{col 38}{space 1}    4.26{col 47}{space 3}0.000{col 55}{space 4} .0376198{col 68}{space 3} .1017905
{txt}{space 11}2  {c |}{col 15}{res}{space 2} .0314523{col 27}{space 2} .0120105{col 38}{space 1}    2.62{col 47}{space 3}0.009{col 55}{space 4} .0078857{col 68}{space 3}  .055019
{txt}{space 11}3  {c |}{col 15}{res}{space 2}-.0068005{col 27}{space 2} .0120642{col 38}{space 1}   -0.56{col 47}{space 3}0.573{col 55}{space 4}-.0304725{col 68}{space 3} .0168715
{txt}{space 11}4  {c |}{col 15}{res}{space 2}-.0450533{col 27}{space 2} .0164701{col 38}{space 1}   -2.74{col 47}{space 3}0.006{col 55}{space 4}-.0773705{col 68}{space 3}-.0127361
{txt}{space 11}5  {c |}{col 15}{res}{space 2}-.0833061{col 27}{space 2} .0228345{col 38}{space 1}   -3.65{col 47}{space 3}0.000{col 55}{space 4}-.1281113{col 68}{space 3} -.038501
{txt}{hline 14}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 6 0 79}Note: dy/dx for factor levels is the discrete change from the base level.{txt}{p_end}
{res}{txt}
{com}. marginsplot, yline(0) recast(line) recastci(rarea) ciopt(color(gs10%30)) xtitle("Gun Control") ytitle("Marginal Treatment Effect", size(small)) title("") ylab(-.2(.1).2) subtitle("Attitudes Toward Vietnamese Americans") addplot(hist gunrestrict, freq ysc(r(-.2 .2) axis(1))ylab(-.2(.1).2, axis(1)) yaxis(2) yscale(alt axis(2)) ytitle("Frequency", axis(2) size(small)) fcolor(none) bcolor(gs5%40)) legend(off) xlab(-1 `""Strongly" "favor""' -.5 `""Somewhat" "favor""' 0 "Neither" .5 `""Somewhat" "oppose""' 1 `""Strongly" "oppose""') saving(s1.gph, replace)
{res}
{text}{p 0 0 2}Variables that uniquely identify margins: {bf:gunrestrict}{p_end}
{res}{txt}file {bf:s1.gph} saved

{com}. 
. *Individual DVs - Table A2
. reg viet_favor01 i.treat_viet##c.gunrestrict PID favasian

{txt}      Source {c |}       SS           df       MS      Number of obs   ={res}     1,083
{txt}{hline 13}{c +}{hline 34}   F(5, 1077)      = {res}    47.06
{txt}       Model {c |} {res} 10.0278057         5  2.00556114   {txt}Prob > F        ={res}    0.0000
{txt}    Residual {c |} {res} 45.8976051     1,077  .042616161   {txt}R-squared       ={res}    0.1793
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.1755
{txt}       Total {c |} {res} 55.9254108     1,082  .051687071   {txt}Root MSE        =   {res} .20644

{txt}{hline 25}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}            viet_favor01{col 26}{c |} Coefficient{col 38}  Std. err.{col 50}      t{col 58}   P>|t|{col 66}     [95% con{col 79}f. interval]
{hline 25}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 12}1.treat_viet {c |}{col 26}{res}{space 2} .0016534{col 38}{space 2} .0133053{col 49}{space 1}    0.12{col 58}{space 3}0.901{col 66}{space 4} -.024454{col 79}{space 3} .0277607
{txt}{space 13}gunrestrict {c |}{col 26}{res}{space 2} -.003004{col 38}{space 2}  .012659{col 49}{space 1}   -0.24{col 58}{space 3}0.812{col 66}{space 4}-.0278431{col 79}{space 3} .0218351
{txt}{space 24} {c |}
treat_viet#c.gunrestrict {c |}
{space 22}1  {c |}{col 26}{res}{space 2}-.0292901{col 38}{space 2} .0174063{col 49}{space 1}   -1.68{col 58}{space 3}0.093{col 66}{space 4}-.0634442{col 79}{space 3}  .004864
{txt}{space 24} {c |}
{space 21}PID {c |}{col 26}{res}{space 2} .0282959{col 38}{space 2} .0094662{col 49}{space 1}    2.99{col 58}{space 3}0.003{col 66}{space 4} .0097216{col 79}{space 3} .0468703
{txt}{space 16}favasian {c |}{col 26}{res}{space 2} .3720761{col 38}{space 2} .0250997{col 49}{space 1}   14.82{col 58}{space 3}0.000{col 66}{space 4} .3228263{col 79}{space 3}  .421326
{txt}{space 19}_cons {c |}{col 26}{res}{space 2} .4213161{col 38}{space 2} .0204254{col 49}{space 1}   20.63{col 58}{space 3}0.000{col 66}{space 4}  .381238{col 79}{space 3} .4613942
{txt}{hline 25}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}. est store v2
{txt}
{com}. 
. reg viet_close01 i.treat_viet##c.gunrestrict PID favasian

{txt}      Source {c |}       SS           df       MS      Number of obs   ={res}     1,082
{txt}{hline 13}{c +}{hline 34}   F(5, 1076)      = {res}    11.65
{txt}       Model {c |} {res} 4.07381418         5  .814762836   {txt}Prob > F        ={res}    0.0000
{txt}    Residual {c |} {res} 75.2559265     1,076  .069940452   {txt}R-squared       ={res}    0.0514
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.0469
{txt}       Total {c |} {res} 79.3297406     1,081  .073385514   {txt}Root MSE        =   {res} .26446

{txt}{hline 25}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}            viet_close01{col 26}{c |} Coefficient{col 38}  Std. err.{col 50}      t{col 58}   P>|t|{col 66}     [95% con{col 79}f. interval]
{hline 25}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 12}1.treat_viet {c |}{col 26}{res}{space 2} .0052724{col 38}{space 2} .0170598{col 49}{space 1}    0.31{col 58}{space 3}0.757{col 66}{space 4}-.0282019{col 79}{space 3} .0387466
{txt}{space 13}gunrestrict {c |}{col 26}{res}{space 2} .0195039{col 38}{space 2} .0162178{col 49}{space 1}    1.20{col 58}{space 3}0.229{col 66}{space 4}-.0123183{col 79}{space 3}  .051326
{txt}{space 24} {c |}
treat_viet#c.gunrestrict {c |}
{space 22}1  {c |}{col 26}{res}{space 2}-.0638991{col 38}{space 2} .0223123{col 49}{space 1}   -2.86{col 58}{space 3}0.004{col 66}{space 4}-.1076797{col 79}{space 3}-.0201185
{txt}{space 24} {c |}
{space 21}PID {c |}{col 26}{res}{space 2} .0328569{col 38}{space 2} .0121348{col 49}{space 1}    2.71{col 58}{space 3}0.007{col 66}{space 4} .0090464{col 79}{space 3} .0566674
{txt}{space 16}favasian {c |}{col 26}{res}{space 2} .2083315{col 38}{space 2} .0321803{col 49}{space 1}    6.47{col 58}{space 3}0.000{col 66}{space 4} .1451883{col 79}{space 3} .2714747
{txt}{space 19}_cons {c |}{col 26}{res}{space 2} .3525671{col 38}{space 2} .0261832{col 49}{space 1}   13.47{col 58}{space 3}0.000{col 66}{space 4} .3011911{col 79}{space 3} .4039431
{txt}{hline 25}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}. est store v3
{txt}
{com}. 
. reg viet_values01 i.treat_viet##c.gunrestrict PID favasian

{txt}      Source {c |}       SS           df       MS      Number of obs   ={res}     1,082
{txt}{hline 13}{c +}{hline 34}   F(5, 1076)      = {res}    21.69
{txt}       Model {c |} {res} 6.11871365         5  1.22374273   {txt}Prob > F        ={res}    0.0000
{txt}    Residual {c |} {res} 60.7145234     1,076  .056426137   {txt}R-squared       ={res}    0.0916
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.0873
{txt}       Total {c |} {res} 66.8332371     1,081  .061825381   {txt}Root MSE        =   {res} .23754

{txt}{hline 25}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}           viet_values01{col 26}{c |} Coefficient{col 38}  Std. err.{col 50}      t{col 58}   P>|t|{col 66}     [95% con{col 79}f. interval]
{hline 25}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 12}1.treat_viet {c |}{col 26}{res}{space 2}-.0236717{col 38}{space 2}  .015322{col 49}{space 1}   -1.54{col 58}{space 3}0.123{col 66}{space 4} -.053736{col 79}{space 3} .0063926
{txt}{space 13}gunrestrict {c |}{col 26}{res}{space 2} .0305877{col 38}{space 2} .0145682{col 49}{space 1}    2.10{col 58}{space 3}0.036{col 66}{space 4} .0020024{col 79}{space 3} .0591729
{txt}{space 24} {c |}
treat_viet#c.gunrestrict {c |}
{space 22}1  {c |}{col 26}{res}{space 2}-.1322912{col 38}{space 2} .0200401{col 49}{space 1}   -6.60{col 58}{space 3}0.000{col 66}{space 4}-.1716134{col 79}{space 3}-.0929691
{txt}{space 24} {c |}
{space 21}PID {c |}{col 26}{res}{space 2} .0767986{col 38}{space 2}  .010898{col 49}{space 1}    7.05{col 58}{space 3}0.000{col 66}{space 4}  .055415{col 79}{space 3} .0981823
{txt}{space 16}favasian {c |}{col 26}{res}{space 2} .1185619{col 38}{space 2} .0289258{col 49}{space 1}    4.10{col 58}{space 3}0.000{col 66}{space 4} .0618045{col 79}{space 3} .1753193
{txt}{space 19}_cons {c |}{col 26}{res}{space 2} .4090072{col 38}{space 2} .0235315{col 49}{space 1}   17.38{col 58}{space 3}0.000{col 66}{space 4} .3628344{col 79}{space 3} .4551799
{txt}{hline 25}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}. est store v4
{txt}
{com}. 
. *including PID interaction with treatment
. reg viet_index i.treat_viet##c.gunrestrict i.treat_viet##c.PID favasian

{txt}      Source {c |}       SS           df       MS      Number of obs   ={res}     1,081
{txt}{hline 13}{c +}{hline 34}   F(6, 1074)      = {res}    26.87
{txt}       Model {c |} {res} 5.61029764         6  .935049606   {txt}Prob > F        ={res}    0.0000
{txt}    Residual {c |} {res} 37.3743136     1,074  .034799175   {txt}R-squared       ={res}    0.1305
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.1257
{txt}       Total {c |} {res} 42.9846112     1,080  .039800566   {txt}Root MSE        =   {res} .18655

{txt}{hline 25}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}              viet_index{col 26}{c |} Coefficient{col 38}  Std. err.{col 50}      t{col 58}   P>|t|{col 66}     [95% con{col 79}f. interval]
{hline 25}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 12}1.treat_viet {c |}{col 26}{res}{space 2}-.0062806{col 38}{space 2} .0120452{col 49}{space 1}   -0.52{col 58}{space 3}0.602{col 66}{space 4}-.0299155{col 79}{space 3} .0173543
{txt}{space 13}gunrestrict {c |}{col 26}{res}{space 2} .0074755{col 38}{space 2} .0120925{col 49}{space 1}    0.62{col 58}{space 3}0.537{col 66}{space 4}-.0162522{col 79}{space 3} .0312032
{txt}{space 24} {c |}
treat_viet#c.gunrestrict {c |}
{space 22}1  {c |}{col 26}{res}{space 2}-.0592204{col 38}{space 2} .0176138{col 49}{space 1}   -3.36{col 58}{space 3}0.001{col 66}{space 4}-.0937818{col 79}{space 3} -.024659
{txt}{space 24} {c |}
{space 21}PID {c |}{col 26}{res}{space 2}  .063861{col 38}{space 2} .0120596{col 49}{space 1}    5.30{col 58}{space 3}0.000{col 66}{space 4} .0401979{col 79}{space 3}  .087524
{txt}{space 24} {c |}
{space 8}treat_viet#c.PID {c |}
{space 22}1  {c |}{col 26}{res}{space 2}-.0374952{col 38}{space 2} .0171171{col 49}{space 1}   -2.19{col 58}{space 3}0.029{col 66}{space 4}-.0710819{col 79}{space 3}-.0039085
{txt}{space 24} {c |}
{space 16}favasian {c |}{col 26}{res}{space 2} .2322543{col 38}{space 2} .0227417{col 49}{space 1}   10.21{col 58}{space 3}0.000{col 66}{space 4} .1876312{col 79}{space 3} .2768775
{txt}{space 19}_cons {c |}{col 26}{res}{space 2}  .394698{col 38}{space 2}  .018495{col 49}{space 1}   21.34{col 58}{space 3}0.000{col 66}{space 4} .3584076{col 79}{space 3} .4309885
{txt}{hline 25}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}. est store v5
{txt}
{com}. margins, dydx(treat_viet) at(gunrestrict=(1(1)5))
{res}
{txt}{col 1}Average marginal effects{col 58}{lalign 13:Number of obs}{col 71} = {res}{ralign 5:1,081}
{txt}{col 1}Model VCE: {res:OLS}

{txt}{p2colset 1 13 13 2}{...}
{p2col:Expression:}{res:Linear prediction, predict()}{p_end}
{p2col:dy/dx wrt:}{res:1.treat_viet}{p_end}
{p2colreset}{...}
{lalign 7:1._at: }{space 0}{lalign 11:gunrestrict} = {res:{ralign 1:1}}
{lalign 7:2._at: }{space 0}{lalign 11:gunrestrict} = {res:{ralign 1:2}}
{lalign 7:3._at: }{space 0}{lalign 11:gunrestrict} = {res:{ralign 1:3}}
{lalign 7:4._at: }{space 0}{lalign 11:gunrestrict} = {res:{ralign 1:4}}
{lalign 7:5._at: }{space 0}{lalign 11:gunrestrict} = {res:{ralign 1:5}}

{res}{txt}{hline 14}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 15}{c |}{col 27} Delta-method
{col 15}{c |}      dy/dx{col 27}   std. err.{col 39}      t{col 47}   P>|t|{col 55}     [95% con{col 68}f. interval]
{hline 14}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}{res}0.treat_viet {col 15}{txt}{c |}  (base outcome)
{hline 14}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}1.treat_viet  {txt}{c |}
{space 10}_at {c |}
{space 11}1  {c |}{col 15}{res}{space 2}-.0616277{col 27}{space 2} .0248499{col 38}{space 1}   -2.48{col 47}{space 3}0.013{col 55}{space 4}-.1103876{col 68}{space 3}-.0128679
{txt}{space 11}2  {c |}{col 15}{res}{space 2}-.1208482{col 27}{space 2} .0413095{col 38}{space 1}   -2.93{col 47}{space 3}0.004{col 55}{space 4}-.2019046{col 68}{space 3}-.0397917
{txt}{space 11}3  {c |}{col 15}{res}{space 2}-.1800686{col 27}{space 2} .0584459{col 38}{space 1}   -3.08{col 47}{space 3}0.002{col 55}{space 4}-.2947497{col 68}{space 3}-.0653875
{txt}{space 11}4  {c |}{col 15}{res}{space 2} -.239289{col 27}{space 2} .0758015{col 38}{space 1}   -3.16{col 47}{space 3}0.002{col 55}{space 4}-.3880248{col 68}{space 3}-.0905532
{txt}{space 11}5  {c |}{col 15}{res}{space 2}-.2985094{col 27}{space 2}  .093254{col 38}{space 1}   -3.20{col 47}{space 3}0.001{col 55}{space 4}  -.48149{col 68}{space 3}-.1155288
{txt}{hline 14}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 6 0 79}Note: dy/dx for factor levels is the discrete change from the base level.{txt}{p_end}
{res}{txt}
{com}. margins, dydx(treat_viet) at(PID=(-1(1)1))
{res}
{txt}{col 1}Average marginal effects{col 58}{lalign 13:Number of obs}{col 71} = {res}{ralign 5:1,081}
{txt}{col 1}Model VCE: {res:OLS}

{txt}{p2colset 1 13 13 2}{...}
{p2col:Expression:}{res:Linear prediction, predict()}{p_end}
{p2col:dy/dx wrt:}{res:1.treat_viet}{p_end}
{p2colreset}{...}
{lalign 7:1._at: }{space 0}{lalign 3:PID} = {res:{ralign 2:-1}}
{lalign 7:2._at: }{space 0}{lalign 3:PID} = {res:{ralign 2:0}}
{lalign 7:3._at: }{space 0}{lalign 3:PID} = {res:{ralign 2:1}}

{res}{txt}{hline 14}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 15}{c |}{col 27} Delta-method
{col 15}{c |}      dy/dx{col 27}   std. err.{col 39}      t{col 47}   P>|t|{col 55}     [95% con{col 68}f. interval]
{hline 14}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}{res}0.treat_viet {col 15}{txt}{c |}  (base outcome)
{hline 14}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}1.treat_viet  {txt}{c |}
{space 10}_at {c |}
{space 11}1  {c |}{col 15}{res}{space 2} .0462799{col 27}{space 2} .0190896{col 38}{space 1}    2.42{col 47}{space 3}0.015{col 55}{space 4} .0088228{col 68}{space 3} .0837371
{txt}{space 11}2  {c |}{col 15}{res}{space 2} .0087848{col 27}{space 2} .0114898{col 38}{space 1}    0.76{col 47}{space 3}0.445{col 55}{space 4}-.0137602{col 68}{space 3} .0313298
{txt}{space 11}3  {c |}{col 15}{res}{space 2}-.0287104{col 27}{space 2} .0220365{col 38}{space 1}   -1.30{col 47}{space 3}0.193{col 55}{space 4}-.0719499{col 68}{space 3}  .014529
{txt}{hline 14}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 6 0 79}Note: dy/dx for factor levels is the discrete change from the base level.{txt}{p_end}
{res}{txt}
{com}. 
. esttab v1 v2 v3 v4 v5, drop(0.treat_viet*) se(2) b(2) r2(2)
{res}
{txt}{hline 92}
{txt}                      (1)             (2)             (3)             (4)             (5)   
{txt}               viet_index    viet_favor01    viet_close01    viet_valu~01      viet_index   
{txt}{hline 92}
{txt}1.treat_viet{res}        -0.01            0.00            0.01           -0.02           -0.01   {txt}
            {res} {ralign 12:{txt:(}0.01{txt:)}}    {ralign 12:{txt:(}0.01{txt:)}}    {ralign 12:{txt:(}0.02{txt:)}}    {ralign 12:{txt:(}0.02{txt:)}}    {ralign 12:{txt:(}0.01{txt:)}}   {txt}

{txt}gunrestrict {res}         0.02           -0.00            0.02            0.03*           0.01   {txt}
            {res} {ralign 12:{txt:(}0.01{txt:)}}    {ralign 12:{txt:(}0.01{txt:)}}    {ralign 12:{txt:(}0.02{txt:)}}    {ralign 12:{txt:(}0.01{txt:)}}    {ralign 12:{txt:(}0.01{txt:)}}   {txt}

{txt}1.treat_vi~t{res}        -0.08***        -0.03           -0.06**         -0.13***        -0.06***{txt}
            {res} {ralign 12:{txt:(}0.02{txt:)}}    {ralign 12:{txt:(}0.02{txt:)}}    {ralign 12:{txt:(}0.02{txt:)}}    {ralign 12:{txt:(}0.02{txt:)}}    {ralign 12:{txt:(}0.02{txt:)}}   {txt}

{txt}PID         {res}         0.05***         0.03**          0.03**          0.08***         0.06***{txt}
            {res} {ralign 12:{txt:(}0.01{txt:)}}    {ralign 12:{txt:(}0.01{txt:)}}    {ralign 12:{txt:(}0.01{txt:)}}    {ralign 12:{txt:(}0.01{txt:)}}    {ralign 12:{txt:(}0.01{txt:)}}   {txt}

{txt}favasian    {res}         0.23***         0.37***         0.21***         0.12***         0.23***{txt}
            {res} {ralign 12:{txt:(}0.02{txt:)}}    {ralign 12:{txt:(}0.03{txt:)}}    {ralign 12:{txt:(}0.03{txt:)}}    {ralign 12:{txt:(}0.03{txt:)}}    {ralign 12:{txt:(}0.02{txt:)}}   {txt}

{txt}1.treat_vi~D{res}                                                                        -0.04*  {txt}
            {res}                                                                 {ralign 12:{txt:(}0.02{txt:)}}   {txt}

{txt}_cons       {res}         0.39***         0.42***         0.35***         0.41***         0.39***{txt}
            {res} {ralign 12:{txt:(}0.02{txt:)}}    {ralign 12:{txt:(}0.02{txt:)}}    {ralign 12:{txt:(}0.03{txt:)}}    {ralign 12:{txt:(}0.02{txt:)}}    {ralign 12:{txt:(}0.02{txt:)}}   {txt}
{txt}{hline 92}
{txt}N           {res}         1081            1083            1082            1082            1081   {txt}
{txt}R-sq        {res}         0.13            0.18            0.05            0.09            0.13   {txt}
{txt}{hline 92}
{txt}Standard errors in parentheses
{txt}* p<0.05, ** p<0.01, *** p<0.001

{com}. 
. 
. 
. *CACE
. 
. *compliance rates
. recode viet_gun 0/50=0 51/100=1, gen(viet_gun_di)
{txt}(1,067 differences between {bf:viet_gun_1} and {bf:viet_gun_di})

{com}. tab viet_gun_di treat_viet, col chi2
{txt}
{c TLC}{hline 19}{c TRC}
{c |} Key{col 21}{c |}
{c LT}{hline 19}{c RT}
{c |}{space 5}{it:frequency}{col 21}{c |}
{c |}{space 1}{it:column percentage}{col 21}{c |}
{c BLC}{hline 19}{c BRC}

 RECODE of {c |}
viet_gun_1 {c |}
(viet_gun_ {c |}      treat_viet
        1) {c |}         0          1 {c |}     Total
{hline 11}{c +}{hline 22}{c +}{hline 10}
         0 {c |}{res}       314        146 {txt}{c |}{res}       460 
           {txt}{c |}{res}     57.09      27.65 {txt}{c |}{res}     42.67 
{txt}{hline 11}{c +}{hline 22}{c +}{hline 10}
         1 {c |}{res}       236        382 {txt}{c |}{res}       618 
           {txt}{c |}{res}     42.91      72.35 {txt}{c |}{res}     57.33 
{txt}{hline 11}{c +}{hline 22}{c +}{hline 10}
     Total {c |}{res}       550        528 {txt}{c |}{res}     1,078 
           {txt}{c |}{res}    100.00     100.00 {txt}{c |}{res}    100.00 

{txt}          Pearson chi2({res}1{txt}) = {res} 95.4392  {txt} Pr = {res}0.000
{txt}
{com}. 
. *CACE and ITT among policy supporters
. reg viet_index treat_viet favasian PID if gunrestrict<0

{txt}      Source {c |}       SS           df       MS      Number of obs   ={res}       605
{txt}{hline 13}{c +}{hline 34}   F(3, 601)       = {res}    21.38
{txt}       Model {c |} {res} 2.41830279         3  .806100931   {txt}Prob > F        ={res}    0.0000
{txt}    Residual {c |} {res} 22.6566972       601  .037698331   {txt}R-squared       ={res}    0.0964
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.0919
{txt}       Total {c |} {res} 25.0749999       604  .041514901   {txt}Root MSE        =   {res} .19416

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}  viet_index{col 14}{c |} Coefficient{col 26}  Std. err.{col 38}      t{col 46}   P>|t|{col 54}     [95% con{col 67}f. interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}treat_viet {c |}{col 14}{res}{space 2}  .055796{col 26}{space 2} .0158025{col 37}{space 1}    3.53{col 46}{space 3}0.000{col 54}{space 4} .0247611{col 67}{space 3} .0868309
{txt}{space 4}favasian {c |}{col 14}{res}{space 2} .2131552{col 26}{space 2} .0317005{col 37}{space 1}    6.72{col 46}{space 3}0.000{col 54}{space 4}  .150898{col 67}{space 3} .2754125
{txt}{space 9}PID {c |}{col 14}{res}{space 2} .0381916{col 26}{space 2} .0118146{col 37}{space 1}    3.23{col 46}{space 3}0.001{col 54}{space 4} .0149887{col 67}{space 3} .0613946
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} .3970887{col 26}{space 2} .0266377{col 37}{space 1}   14.91{col 46}{space 3}0.000{col 54}{space 4} .3447744{col 67}{space 3}  .449403
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}. reg viet_gun_di treat_viet if gunrestrict<0

{txt}      Source {c |}       SS           df       MS      Number of obs   ={res}       603
{txt}{hline 13}{c +}{hline 34}   F(1, 601)       = {res}    47.66
{txt}       Model {c |} {res} 10.4360471         1  10.4360471   {txt}Prob > F        ={res}    0.0000
{txt}    Residual {c |} {res}  131.59712       601  .218963595   {txt}R-squared       ={res}    0.0735
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.0719
{txt}       Total {c |} {res} 142.033167       602  .235935494   {txt}Root MSE        =   {res} .46794

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1} viet_gun_di{col 14}{c |} Coefficient{col 26}  Std. err.{col 38}      t{col 46}   P>|t|{col 54}     [95% con{col 67}f. interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}treat_viet {c |}{col 14}{res}{space 2} .2631927{col 26}{space 2} .0381234{col 37}{space 1}    6.90{col 46}{space 3}0.000{col 54}{space 4} .1883214{col 67}{space 3} .3380639
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} .4919094{col 26}{space 2} .0266199{col 37}{space 1}   18.48{col 46}{space 3}0.000{col 54}{space 4}   .43963{col 67}{space 3} .5441887
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}. ivregress 2sls viet_index  (viet_gun_di=treat_viet) if gunrestrict<0
{res}
{txt}{col 1}Instrumental variables 2SLS regression{col 51}Number of obs{col 67}= {res}       603
{txt}{col 1}{col 51}Wald chi2({res}1{txt}){col 67}= {res}     10.78
{txt}{col 1}{col 51}Prob > chi2{col 67}= {res}    0.0010
{txt}{col 1}{col 51}R-squared{col 67}= {res}         .
{txt}{col 51}Root MSE{col 67}=    {res} .20436

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}  viet_index{col 14}{c |} Coefficient{col 26}  Std. err.{col 38}      z{col 46}   P>|z|{col 54}     [95% con{col 67}f. interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 1}viet_gun_di {c |}{col 14}{res}{space 2} .2076955{col 26}{space 2} .0632593{col 37}{space 1}    3.28{col 46}{space 3}0.001{col 54}{space 4} .0837096{col 67}{space 3} .3316815
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} .4433199{col 26}{space 2} .0401083{col 37}{space 1}   11.05{col 46}{space 3}0.000{col 54}{space 4}  .364709{col 67}{space 3} .5219308
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 12 89}Endogenous: {res:viet_gun_di}{p_end}
{p 0 12 89}Exogenous:{space 1} {res:treat_viet}{p_end}

{com}. 
. *CACE and ITT among policy opponents
. reg viet_index treat_viet favasian PID if gunrestrict>0

{txt}      Source {c |}       SS           df       MS      Number of obs   ={res}       289
{txt}{hline 13}{c +}{hline 34}   F(3, 285)       = {res}    22.29
{txt}       Model {c |} {res} 2.26028734         3  .753429115   {txt}Prob > F        ={res}    0.0000
{txt}    Residual {c |} {res} 9.63216365       285  .033797065   {txt}R-squared       ={res}    0.1901
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.1815
{txt}       Total {c |} {res}  11.892451       288  .041293233   {txt}Root MSE        =   {res} .18384

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}  viet_index{col 14}{c |} Coefficient{col 26}  Std. err.{col 38}      t{col 46}   P>|t|{col 54}     [95% con{col 67}f. interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}treat_viet {c |}{col 14}{res}{space 2}-.0631946{col 26}{space 2}  .021687{col 37}{space 1}   -2.91{col 46}{space 3}0.004{col 54}{space 4}-.1058815{col 67}{space 3}-.0205076
{txt}{space 4}favasian {c |}{col 14}{res}{space 2} .2838986{col 26}{space 2} .0414058{col 37}{space 1}    6.86{col 46}{space 3}0.000{col 54}{space 4} .2023986{col 67}{space 3} .3653987
{txt}{space 9}PID {c |}{col 14}{res}{space 2} .0462411{col 26}{space 2} .0162632{col 37}{space 1}    2.84{col 46}{space 3}0.005{col 54}{space 4} .0142299{col 67}{space 3} .0782524
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} .3751185{col 26}{space 2} .0327572{col 37}{space 1}   11.45{col 46}{space 3}0.000{col 54}{space 4} .3106418{col 67}{space 3} .4395952
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}. reg viet_gun_di treat_viet if gunrestrict>0

{txt}      Source {c |}       SS           df       MS      Number of obs   ={res}       290
{txt}{hline 13}{c +}{hline 34}   F(1, 288)       = {res}    64.02
{txt}       Model {c |} {res} 13.1622846         1  13.1622846   {txt}Prob > F        ={res}    0.0000
{txt}    Residual {c |} {res} 59.2135774       288  .205602699   {txt}R-squared       ={res}    0.1819
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.1790
{txt}       Total {c |} {res} 72.3758621       289  .250435509   {txt}Root MSE        =   {res} .45343

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1} viet_gun_di{col 14}{c |} Coefficient{col 26}  Std. err.{col 38}      t{col 46}   P>|t|{col 54}     [95% con{col 67}f. interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}treat_viet {c |}{col 14}{res}{space 2} .4265828{col 26}{space 2} .0533153{col 37}{space 1}    8.00{col 46}{space 3}0.000{col 54}{space 4} .3216457{col 67}{space 3} .5315199
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} .2763158{col 26}{space 2} .0367784{col 37}{space 1}    7.51{col 46}{space 3}0.000{col 54}{space 4} .2039273{col 67}{space 3} .3487043
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}. ivregress 2sls viet_index (viet_gun_di=treat_viet) if gunrestrict>0
{res}
{txt}{col 1}Instrumental variables 2SLS regression{col 51}Number of obs{col 67}= {res}       288
{txt}{col 1}{col 51}Wald chi2({res}1{txt}){col 67}= {res}      6.94
{txt}{col 1}{col 51}Prob > chi2{col 67}= {res}    0.0084
{txt}{col 1}{col 51}R-squared{col 67}= {res}         .
{txt}{col 51}Root MSE{col 67}=    {res} .21572

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}  viet_index{col 14}{c |} Coefficient{col 26}  Std. err.{col 38}      z{col 46}   P>|z|{col 54}     [95% con{col 67}f. interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 1}viet_gun_di {c |}{col 14}{res}{space 2}-.1561562{col 26}{space 2} .0592747{col 37}{space 1}   -2.63{col 46}{space 3}0.008{col 54}{space 4}-.2723324{col 67}{space 3}-.0399799
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} .6326952{col 26}{space 2} .0311173{col 37}{space 1}   20.33{col 46}{space 3}0.000{col 54}{space 4} .5717065{col 67}{space 3} .6936839
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 12 89}Endogenous: {res:viet_gun_di}{p_end}
{p 0 12 89}Exogenous:{space 1} {res:treat_viet}{p_end}

{com}. 
. 
. 
. *table a1. demographics
. tab sex

        {txt}sex {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          1 {c |}{res}        468       45.00       45.00
{txt}          2 {c |}{res}        567       54.52       99.52
{txt}          3 {c |}{res}          5        0.48      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}      1,040      100.00
{txt}
{com}. sum age, detail

                             {txt}age
{hline 61}
      Percentiles      Smallest
 1%    {res}        2              2
{txt} 5%    {res}        2              2
{txt}10%    {res}        2              2       {txt}Obs         {res}      1,042
{txt}25%    {res}        3              2       {txt}Sum of wgt. {res}      1,042

{txt}50%    {res}        5                      {txt}Mean          {res} 4.690979
                        {txt}Largest       Std. dev.     {res} 1.723013
{txt}75%    {res}        6              8
{txt}90%    {res}        7              9       {txt}Variance      {res} 2.968775
{txt}95%    {res}        7              9       {txt}Skewness      {res} .1172089
{txt}99%    {res}        8              9       {txt}Kurtosis      {res} 2.024929
{txt}
{com}. tab race

       {txt}race {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          1 {c |}{res}        759       72.84       72.84
{txt}          2 {c |}{res}        128       12.28       85.12
{txt}          3 {c |}{res}         54        5.18       90.31
{txt}          4 {c |}{res}         71        6.81       97.12
{txt}          5 {c |}{res}         30        2.88      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}      1,042      100.00
{txt}
{com}. tab educ

       {txt}educ {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          1 {c |}{res}         30        2.88        2.88
{txt}          2 {c |}{res}        255       24.50       27.38
{txt}          3 {c |}{res}        277       26.61       53.99
{txt}          4 {c |}{res}        130       12.49       66.47
{txt}          5 {c |}{res}        239       22.96       89.43
{txt}          6 {c |}{res}         84        8.07       97.50
{txt}          7 {c |}{res}         26        2.50      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}      1,041      100.00
{txt}
{com}. tab PID3

  {txt}RECODE of {c |}
        PID {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          1 {c |}{res}        435       39.37       39.37
{txt}          2 {c |}{res}        352       31.86       71.22
{txt}          3 {c |}{res}        318       28.78      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}      1,105      100.00
{txt}
{com}. tab ideo3

  {txt}RECODE of {c |}
ideo (ideo) {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          1 {c |}{res}        398       36.02       36.02
{txt}          2 {c |}{res}        373       33.76       69.77
{txt}          3 {c |}{res}        334       30.23      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}      1,105      100.00
{txt}
{com}. 
{txt}end of do-file

{com}. log close
      {txt}name:  {res}<unnamed>
       {txt}log:  {res}C:\Users\scottclifford\Dropbox\Research\Group Attitudes\Replication\s1log.smcl
  {txt}log type:  {res}smcl
 {txt}closed on:  {res}29 May 2024, 15:59:29
{txt}{.-}
{smcl}
{txt}{sf}{ul off}